# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=bandwhich
pkgver=0.21.1
pkgrel=0
pkgdesc="Terminal bandwidth utilization tool"
url="https://github.com/imsnif/bandwhich"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/imsnif/bandwhich/archive/v$pkgver/bandwhich-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen || true
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
4bd48c598e643c5541884fab5df8534138078820833c3248dcf778616b1149fa074e43a8448e8dc92bc8d06f5e76baa8df9e7f4f2c5eccd21ab15190e17b0cf2  bandwhich-0.21.1.tar.gz
"
